package com.loong.order.controller.forehead;

import com.loong.common.mvc.BaseForeheadController;
import com.loong.common.param.BaseIdParam;
import com.loong.common.rest.Result;
import com.loong.order.handler.PaymentOrderHandler;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description: 支付订单控制
 * @Author: hzp
 * @Date: 2021-1-12 9:24
 */
@RestController
@RequestMapping("forehead/order/paymentOrder")
public class PaymentOrderController extends BaseForeheadController {
    @Resource
    private PaymentOrderHandler paymentOrderHandler;

    /**
     * 查询支付订单
     * @param param orderId
     * @return PaymentOrderForeheadResult
     */
    @PostMapping("findPaymentOrder")
    public Result findPaymentOrder(@RequestBody BaseIdParam param){
        return handlerExecutor.execute(()->paymentOrderHandler.findPaymentOrder(param.getId()));
    }

}
